{extend name="layout"}
{block name="content"}
<div class="box-header with-border">
    <h3 class="box-title">专题列表</h3>
</div>
<a type="button" class="btn " href="/admin/topics/create" >添加专题</a>
<!-- /.box-header -->
<div class="box-body">
    <table class="table table-bordered">
        <tbody><tr>
            <th style="width: 10px">#</th>
            <th>专题名称</th>
            <th>操作</th>
        </tr>
        {volist name='topics' id='topic'}
        <tr>
            <td>{$topic.id}</td>
            <td>{$topic.title}</td>

            {if $topic.delete_time}
            <td>
                <a type="button" class="btn recover" opt-id="{$topic.id}" data-title="{$topic.title}">恢复</a>
            </td>
            {else/}
            <td>
                <a  class="btn" href="/admin/topics/{$topic.id}/update">修改</a>
                |
                <a type="button" class="btn delete" opt-id="{$topic.id}" data-title="{$topic.title}" >删除</a>
            </td>
            {/if}
        </tr>
        {/volist}
        <!--<tr>
            <td>2</td>
            <td>轻松</td>
            <td>
                <a type="button" class="btn recover" opt-id="{$topic.id}" data-title="{$topic.title}">恢复</a>
            </td>
        </tr>-->
        </tbody></table>
</div>
{/block}

{block name="footerscript"}
{js href='/static/js/backend/topic/index.js' /}
{/block}